package mn.idax.exchange.otc.mapper;

import mn.idax.exchange.otc.domain.MyExamineListDTO;
import mn.idax.exchange.otc.entity.OTCCertificate;
import mn.idax.exchange.otc.vo.PageRequestDTO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface OTCCertificateMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(OTCCertificate record);

    int insertSelective(OTCCertificate record);

    OTCCertificate selectByPrimaryKey(Integer id);
    OTCCertificate selectByApprovalIdUserId(@Param("approvalId") Integer approvalId,@Param("userId") Integer userId);
    OTCCertificate selectByApprovalIdUserIdStatus(@Param("approvalId") Integer approvalId,@Param("userId") Integer userId, @Param("status") Integer status);

    int updateByPrimaryKeySelective(OTCCertificate record);

    int updateByPrimaryKey(OTCCertificate record);

    int updateExpired();

    List<MyExamineListDTO> selectByBusinessIdStatus(@Param("businessId") Integer businessId,@Param("status") Integer status, @Param("page")PageRequestDTO pageRequestDTO);
    Integer countByBusinessIdStatus(@Param("businessId") Integer businessId,@Param("status") Integer status);

    List<OTCCertificate> selectByIdBusinessIdStatus(@Param("id") Integer id ,@Param("businessId") Integer businessId,@Param("status") Integer status);

    OTCCertificate selectByIdUserIdOrBusinessId(@Param("id") Integer id ,@Param("userId") Integer userId);
}